<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/tld/pageutil.tld" prefix="pu"%>
<%@taglib uri="/WEB-INF/tld/pageable.tld" prefix="pageable"%>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt-rt"%>
<style>
.tableAlignLeft td{
	text-align:left;
}
</style>
<h1>
整单退货
</h1>
<%--
<c-rt:if test="${!empty message}">
	${message }
	</c-rt:if>
	<c-rt:if test="${empty message}">
	 --%>
	 <c-rt:if test="${true }">
	${pu:listAdd('params', param.orderId) }
	${pu:reqSet('serviceOrders', pu:queryByHql('from ServiceOrders where orderId=?', pu:arrayGet('params'), null)) }
	

<table class="tb-1 tableAlignLeft">
<thead>
<tr>
	<th>服务单编号</th><th>商品名称</th><th>明细</th><th>退货原因</th><th>退货原因描述</th><th>配件赠品状态</th>
</tr>
</thead>
<tbody>
	<c-rt:forEach items="${serviceOrders}" var="so">
	${pu:reqSet('params', null) }
	${pu:listAdd('params', so.serviceId) }
	${pu:reqSet('sops', pu:queryByHql('from ServiceOrderProduct where serviceId=?', pu:arrayGet('params'), null)) }
		<tr>
			<td><a target="_so" href="/ecadmin/serviceOrder/page.do?iamlazy=detail&from=returnAll&serviceId=${so.serviceId }">${so.serviceId }</a></td>
			<td>
			<c-rt:forEach items="${sops}" var="sop">
			${sop.prodName } x ${sop.qty }
			</c-rt:forEach>
			</td>
			<td>
			<c-rt:forEach items="${sops}" var="sop">
			<c-rt:forEach items="${sop.serviceOrderDetail }" var="sod">
				${sod.prodName }[${sod.prodSpecName }]x${sod.qty }<br/>
			</c-rt:forEach>
			</c-rt:forEach>
			</td>
			<td>
			 ${so.reason }
			</td>
			<td>
			${so.description }
			</td>
			<td>
			${so.accessaryDescription }
			</td>
		</tr>
	</c-rt:forEach>
</tbody>
</table>
<table class="tb-1 tableAlignLeft">
	<tr>
		<th>
		姓名
		</th>
		<td>
		${serviceOrders[0].receiverName }
		</td>
	</tr>
	<tr>
		<th>联络地址</th>
		<td>
		${serviceOrders[0].receiverProvince }
        ${serviceOrders[0].receiverCity }
        ${serviceOrders[0].receiverArea }
              <br /> 
              邮编：${serviceOrders[0].receiverZip}
              街道：${serviceOrders[0].receiverAddr } 
		</td>
	</tr>
	<tr>
		<th>手机电话</th>
		<td>${serviceOrders[0].receiverMobile }</td>
	</tr>
	<tr>
		<th>固定电话</th>
		<td>
			${serviceOrders[0].receiverPhoneArea }-${serviceOrders[0].receiverPhone }-分机${serviceOrder[0].receiverExt }
		</td>
	</tr>
	
</table>
</c-rt:if>